<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEvaluatiesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('evaluaties', function (Blueprint $table) {
            $table->increments('id');
            $table->string('flow_id',255)->comment('流程ID');
            $table->string('step_id',255)->comment('步骤ID');
            $table->string('name',255)->comment('评价表名称');
            $table->string('belong_flow',255)->comment('适应流程');
            $table->string('belong_step',255)->comment('评价表步骤');
            $table->string('owner_name',255)->comment('创建人姓名');
            $table->integer('company_id')->comment('公司ID');
            $table->integer('user_id')->comment('用户ID');
            $table->tinyInteger('status')->default(0)->comment('是否删除 1：是 0：否');
            $table->tinyInteger('is_on')->default(0)->comment('是否启用 1：关闭 0：启用');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `evaluaties` comment '评价表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('evaluaties');
    }
}
